import { Toast } from 'vant';

export default function handleCatch(err) {
  Toast.fail(err.message);

  if(typeof(err.response) === "undefined") {
    return Promise.reject({code:-1,msg:err.message});
  }
  return Promise.reject(err);
};
